<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <link rel="stylesheet" href="./style/reset.css"> -->
    <script src="./scripts/index.js"></script>
</head>

<body>
    <div id="content" style="width:300px;height:300px;border:1px red solid"></div>
    <input type="text" name="" id="msg">
    <button id="submit">提交</button>
    <script>

        document.querySelector('#submit')
            .addEventListener('click', function () {
                var mgs2 = msg.value
                ws.send(mgs2)
                msg.value = ''

            })
    </script>
</body>

</html>